<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vue</title>
</head>
<body>
<!--第一步，导入Vue.js-->
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
<!--view层 模板-->
<div id='app'>
    <!--    组件:传递给组件中的值：props-->
    <xjun v-for="item in items" v-bind:jun="item"></xjun>
</div>
<script>
    //定义一个Vue组件component
    Vue.component("xjun", {
        props: ['jun'],
        template: '<li>{{jun}}</li>'
    });

    var vm = new Vue({
        el: '#app',
        data: {
            items: ["Java,", "Linux", "implement", "abstract", "Python"]
        }
    });
</script>
</body>
</html>